package top.hitotright.hdfs;

import java.io.IOException;
import java.net.URI;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

public class FileSystemMKDir {
	public static void main(String[] args) throws IOException {
		String uri = "hdfs://master:9000/user/test";
		Configuration conf = new Configuration();
		FileSystem fs = FileSystem.get(URI.create(uri),conf);
		Path path = new Path(uri);
		fs.mkdirs(path);
		Boolean isExists = fs.exists(path);
		System.out.println("dir make:"+ isExists);
	}
}
